import Admin from '../views/admin/main/index'
import adminUser from '../views/admin/user/routes'
import role from '../views/admin/role/routes'
import permission from '../views/admin/permission/routes'
import permissionGroup from '../views/admin/permission-group/routes'
import menu from '../views/admin/menu/routes'
import adminDashboard from '../views/admin/dashboard/routes'
import adminLogin from '../views/admin/login/routes'
import stores from '../views/admin/store/routes'
import checkStoreIndex from '../views/admin/check-store/routes'
import subAccountRole from '../views/admin/sub-account-role/routes'
import subAccount from '../views/admin/sub-account/routes'
import storeInfo from '../views/admin/store-info/routes'
import storeLogin from '../views/admin/store-login/routes'
import mCategoryIndex from '../views/admin/m-category/routes'
import pCategoryIndex from '../views/admin/p-category/routes'

export default [
  {
    name: 'adminMain',
    path: '/admin',
    redirect: '/admin/dashboard',
    meta: {
      provider: 'admin',
      title: 'home',
    },
    component: Admin,
    children: [
      ...adminDashboard,
        ...adminUser,
        ...role,
        ...permission,
        ...permissionGroup,
        ...menu,
        ...stores,
        ...checkStoreIndex,
        ...subAccountRole,
        ...subAccount,
        ...storeInfo,
        ...storeLogin,
        ...mCategoryIndex,
        ...pCategoryIndex,
    ]
  },
  ...adminLogin,
]
